<%@ Page Language="C#" MasterPageFile="~/manager/logger.master" AutoEventWireup="true"
    CodeFile="log.aspx.cs" Inherits="SmartParking.Web.Manager.Log" Title="SmartParking >> Manager :: Log" %>

<%@ Register Assembly="ADEVSO" Namespace="ADEVSO.Web.UI.WebControls" TagPrefix="ADEVSO" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LoggerContentPlaceHolder" runat="Server">
    <table width="100%" border="0" cellspacing="8" cellpadding="2">
        <tr>
            <td>
                <h1>Smart Parking Log Activity</h1>
            </td>
        </tr>
        <tr>
            <td align="left">
                <table width="100%">
                    <tr>
                        <td>
                            <b>Manager</b>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlManager" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td>
                            <b>Action</b>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlAction" runat="server">
                                <asp:ListItem Text="INSERT" Value="INSERT"></asp:ListItem>
                                <asp:ListItem Text="UPDATE" Value="UPDATE"></asp:ListItem>
                                <asp:ListItem Text="DELETE" Value="DELETE"></asp:ListItem>
                                <asp:ListItem Text="SELECT" Value="SELECT"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>Table</b>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlTable" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td>
                            <b>IP Address</b>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlIPAddress" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>From</b>
                        </td>
                        <td>
                            <asp:TextBox ID="txtFromDate" runat="server" Width="110px"></asp:TextBox>
                            <asp:ImageButton ID="imgbtnFromDate" runat="server" ImageUrl="~/media/img/calendar.png" />
                            <ajaxToolkit:CalendarExtender ID="calFromDate" runat="server" TargetControlID="txtFromDate"
                                EnableViewState="true" Format="MM/dd/yyyy" PopupButtonID="imgbtnFromDate" PopupPosition="Right">
                            </ajaxToolkit:CalendarExtender>
                        </td>
                        <td>
                            <b>To</b>
                        </td>
                        <td>
                            <asp:TextBox ID="txtToDate" runat="server" Width="110px"></asp:TextBox>
                            <asp:ImageButton ID="imgbtnToDate" runat="server" ImageUrl="~/media/img/calendar.png" />
                            <ajaxToolkit:CalendarExtender ID="calToDate" runat="server" TargetControlID="txtToDate"
                                EnableViewState="true" Format="MM/dd/yyyy" PopupButtonID="imgbtnToDate" PopupPosition="Right">
                            </ajaxToolkit:CalendarExtender>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" align="left">
                            <asp:Button ID="btnRun" runat="server" Text="Run" onclick="btnRun_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <asp:GridView ID="gvLog" runat="server" AutoGenerateColumns="False" CellPadding="3" Width="100%"
                    OnRowDataBound="gvLog_RowDataBound" AllowPaging="True" GridLines="Horizontal"
                    OnPageIndexChanging="gvLog_PageIndexChanging" PageSize="20">
                    <PagerSettings Mode="NumericFirstLast" />
                    <Columns>
                        <asp:TemplateField HeaderText="Manager" InsertVisible="False" SortExpression="IdManager">
                            <ItemTemplate>
                                <asp:HiddenField ID="hfIdManager" runat="server" Value='<%# Bind("ManagerID") %>' />
                                <asp:Label ID="lblManager" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Action" HeaderText="Action" InsertVisible="False" SortExpression="Action" />
                        <asp:BoundField DataField="AffectedTable" HeaderText="Entity" SortExpression="Table" />
                        <asp:BoundField DataField="IPAddress" HeaderText="IP Address" SortExpression="IPAddress" />
                        <asp:BoundField DataField="Date" DataFormatString="{0:dd/MM/yyyy hh:mm:ss tt}" HeaderText="Date"
                            SortExpression="Date" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
